home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / portal2.zip / PORTAL.ASP < prev    next >
Text File  |  1988-03-13  |  3KB  |  95 lines

  1. ;  ProComm+ logon script for Portal accessed via Telenet or PC Pursuit
  2. ;  Released to the public domain by K. Patz
  3. ;
  4. ;  S1 = "c portal,id,password^M"; id,password is PC Pursuit ID and password
  5. ;  if not using PC Pursuit, S1 = "c portal^M"
  6. ;
  7. ;  S2 = your Portal user name followed by ^M
  8. ;  S3 = your Portal password followed by ^M
  9.  
  10. ASSIGN S1 "c portal,pcpid,pcppassword^M"   ;*** Include PC Pursuit ID/pswd
  11. ASSIGN S2 "Your User Name^M"               ;*** Portal user name
  12. ASSIGN S3 "YourPortalPassword^M"           ;*** Portal password
  13.  
  14. SET DATABITS 8              ; Select 8 bits no parity
  15. SET PARITY NONE             ; so Telenet messages come in clear
  16. INIT N0 10                  ;Number of times to try
  17. IF LINKED
  18.     GOTO SKIPDIAL
  19. ENDIF
  20. REDIAL:
  21. HANGUP
  22. DIAL "5"                    ;*** Change to Telenet/Portal entry in dialing dir
  23. SKIPDIAL:
  24. PAUSE 1
  25. TRANSMIT "^M"               ;Send CR D CR Telenet 8 bits no parity
  26. PAUSE 1
  27. TRANSMIT "D^M"
  28. WAITFOR "TERMINAL="
  29. PAUSE 1
  30. TRANSMIT "^M"               ;Response to TERMINAL= prompt
  31. WAITFOR "@"
  32. LOOP:
  33. PAUSE 1
  34. TRANSMIT S1                 ;Send Telenet connect command and PCP info
  35. WAITFOR "moment, please" 20 ;Wait for initial Portal message
  36. IF NOT WAITFOR              ;Retry if not received
  37.     GOTO RETRY
  38. ENDIF
  39. WAITFOR "INFO, or HELP:" 120   ;Wait for Portal user ID prompt
  40. IF NOT WAITFOR
  41.     GOTO RETRY              ;If it doesn't appear, error
  42. ENDIF
  43. PAUSE 1
  44. SET PARITY NONE             ;Select 8 bits no parity for Portal
  45. SET DATABITS 8          
  46. TRANSMIT S2                 ;Send user name
  47. WAITFOR "password: "        ;Wait for password prompt
  48. PAUSE 1
  49. TRANSMIT S3                 ;Send password
  50. ;
  51. ; ** If you don't want to have this script file change your default setting
  52. ;    to pseudonym, delete this code up to the "END OF PSEUDONYM CODE" comment.
  53. ;
  54. WAITFOR "URN> to continue" 120 ;Wait for prompt at end of opening msg
  55. IF NOT WAITFOR
  56.     GOTO RETRY
  57. ENDIF
  58. PAUSE 1
  59. TRANSMIT "^M"               ;Respond by sending CR
  60. WAITFOR "Command: " 120     ;Wait for main menu command line
  61. IF NOT WAITFOR
  62.     GOTO RETRY
  63. ENDIF
  64. PAUSE 1
  65. TRANSMIT "7;3;;1;TOP^M"     ;Go to user settings, select pseudonym, goto TOP
  66. ;
  67. ; **  END OF PSEUDONYM CODE
  68. ;
  69. PAUSE 5
  70. TRANSMIT "^M"
  71. TERMINAL                    ; We're all done!!!!!
  72.  
  73. RETRY:                   ;Retry 10 times if failure to reach Portal
  74. DEC N0
  75. IF ZERO N0
  76.     MESSAGE "Failure to connect to Portal"
  77.     HANGUP                ;After ten failed attempts hang up and quit
  78.     TERMINAL
  79. ELSE
  80.     WAITFOR "@" 15        ;Wait for Portal to return to Telenet
  81.     IF NOT WAITFOR
  82.         TRANSMIT "^M"     ;Send carriage return to reestablish @ prompt
  83.         WAITFOR "@" 5
  84.             IF NOT WAITFOR
  85.             TRANSMIT "@^M"    ;Return to Telenet if Portal doesn't disconnect
  86.             WAITFOR "@" 10
  87.             IF NOT WAITFOR
  88.                 GOTO REDIAL
  89.             ENDIF
  90.             TRANSMIT "D^M"    ;Disconnect from Portal
  91.         ENDIF
  92.     ENDIF
  93.     GOTO LOOP
  94. ENDIF
  95.